Processing documents in a hot folder based on size of the documents

ABSTRACT

When it is detected that a file has been stored in a hot folder, an apparatus stands by for a predetermined period of time not to process the file based on settings associated with the hot folder. When the predetermined period of time elapses, the apparatus processes the file based on the settings associated with the hot folder.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an information processing apparatus forprocessing a hot folder, an information processing method, and a storagemedium storing a program.

2. Description of the Related Art

A hot folder for printing without describing print settings is known,which enables a user to more readily print. This is a technique forcopying job data to be printed in a folder set as a hot folder(inputting a print job), and performing print processing. An applicationwhich uses a hot folder, an operator who performs a GUI operation, orthe like copies job data in a hot folder as a trigger to execute printprocessing.

Japanese Patent Laid-Open No. 2006-222661 describes a method fordetecting job data input in a hot folder. According to Japanese PatentLaid-Open No. 2006-222661, input of job data is determined based onevent data sent when a folder name is changed and the job data istransmitted to a print control apparatus, which can eliminate the needfor periodic polling in a hot folder.

A job may be input in a hot folder between different OSs. When a job isinput (a file is stored by a copy operation or the like) betweendifferent OSs, a delay in starting a file lock occurs. Note that a filelock indicates access control performed by an OS for a file beingcopied.

In general, when a file is copied in a hot folder using drag-and-drop,it is in a locked state immediately after the copy operation startsuntil the copy operation is completed. A hot folder program checks thata target file is not in a locked state, and then performs processingsuch as output of the file to a printing apparatus.

If a file is copied in a hot folder between different OSs, however, adelay in starting a file lock may occur. Consequently, until a file lockstarts, the hot folder program recognizes that the file is not in alocked state. Even though the file is being copied, therefore, the hotfolder program starts processing such as output to a printing apparatus,thereby giving an inappropriate processing result.

SUMMARY OF THE INVENTION

An aspect of the present invention is to eliminate the above-mentionedproblems with the conventional technology. The present inventionprovides an information processing apparatus which performs appropriateprocessing for a file even when the file is stored in a hot folderbetween different OSs, an information processing method, and a storagemedium storing a program.

The present invention in its first aspect provides an informationprocessing apparatus for processing a file stored in a hot folder,comprising: a detection unit configured to detect that the file has beenstored in the hot folder; a processing unit configured to process thefile based on settings associated with the hot folder; and a controlunit configured to control, when the detection unit detects the file,the processing unit to stand by for a predetermined period of time notto process the file based on the settings associated with the hotfolder.

The present invention in its second aspect provides an informationprocessing method which is executed in an information processingapparatus for processing a file stored in a hot folder, comprising: adetection step of detecting that the file has been stored in the hotfolder; a processing step of processing the file based on settingsassociated with the hot folder; and a control step of controlling, whenthe file is detected in the detection step, the processing step to standby for a predetermined period of time not to process the file based onthe settings associated with the hot folder.

The present invention in its third aspect provides a computer-readablestorage medium storing a program for causing a computer to execute adetection step of detecting that a file has been stored in a hot folder;a processing step of processing the file based on settings associatedwith the hot folder; and a control step of controlling, when the file isdetected in the detection step, the processing step to stand by for apredetermined period of time not to process the file based on thesettings associated with the hot folder.

According to the present invention, it is possible to performappropriate processing for a file even when the file is stored in a hotfolder between different OSs.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a view showing the overall configuration of an informationprocessing system;

FIG. 2 is a view showing the hardware configuration of an informationprocessing apparatus for managing a hot folder;

FIG. 3 is a block diagram showing the block configuration of theinformation processing apparatus for managing a hot folder;

FIG. 4 is a block diagram showing the structure of a hot folder program;

FIG. 5 is a flowchart illustrating the procedure of job monitoringprocessing for a hot folder according to the first embodiment;

FIG. 6 is a view showing an example of setting of a standby time; and

FIG. 7 is a flowchart illustrating the procedure of job monitoringprocessing for a hot folder according to the second embodiment.

DESCRIPTION OF THE EMBODIMENTS

Preferred embodiments of the present invention will now be describedhereinafter in detail, with reference to the accompanying drawings. Itis to be understood that the following embodiments are not intended tolimit the claims of the present invention, and that not all of thecombinations of the aspects that are described according to thefollowing embodiments are necessarily required with respect to the meansto solve the problems according to the present invention. Note that thesame reference numerals denote the same components, and a repetitivedescription thereof will be omitted.

First Embodiment

FIG. 1 is a view showing the overall configuration of an informationprocessing system according to the embodiment of the present invention.An information processing apparatus 101 shown in FIG. 1 may be, forexample, a PC or a dedicated terminal. In this embodiment, a PC is usedas the information processing apparatus 101. In this embodiment, assumethat a hot folder shared by users has been created in the informationprocessing apparatus 101. A hot folder, however, may be created in, forexample, an external mass storage device. A printing apparatus 102 (toalso be referred to as a printer hereinafter) is connected with theinformation processing apparatus 101. Although the printing apparatus102 is directly connected with the information processing apparatus 101in the embodiment, it may be connected with the apparatus 101 via anetwork 110 (to be described later). The printing apparatus 102 is, forexample, a laser printer, an inkjet printer, or a thermal printer. Theprinting apparatus 102 prints based on data input to the hot folder. Aninformation processing apparatus 103 serves as a PC for inputting printdata to the hot folder of the information processing apparatus 101. Theinformation processing apparatus 103 can refer to the hot folder of theinformation processing apparatus 101 shared by the users via the network110. The user can print based on data from the printing apparatus 102 byonly storing the data in the hot folder of the information processingapparatus 101 from the information processing apparatus 103. The network110 may be a wired or wireless LAN.

FIG. 2 is a view showing the hardware configuration of the informationprocessing apparatus 101 for managing the hot folder. A pointing device202, a keyboard 203, and a display 204 are connected to correspondinginput/output terminals of a main body 201, respectively. In theembodiment, the information processing apparatus 103 has the sameconfiguration as that of the information processing apparatus 101.

FIG. 3 is a block diagram showing the block configuration of theinformation processing apparatus 101 for managing the hot folder. Aprint function using the hot folder is executed by a hot folder programon the computer. More specifically, the apparatus 101 includes a CPU301, a ROM 302, a RAM 303, an external storage device 304, a network I/F305, an input/output device I/F 306, a display I/F 307, a system bus308, the display 204, the keyboard 203, and the pointing device 202.

The CPU 301 controls the information processing apparatus 101 as awhole. The ROM 302 is a read only memory. An example of the ROM 302includes a PROM in which the user can electrically write a program, anda mask ROM in which contents are written in manufacturing. In theembodiment, the ROM 302 may be either of them. The RAM 303 is a memoryfor which it is possible to freely perform a write/read operation. TheRAM 303 serves to temporarily store data when performing processing inthis embodiment. The external storage device 304 is a non-volatilestorage device. An example of the external storage device 304 includesan HD drive, FD drive, MO drive, CD-RW drive, and DVD-RW drive. Theexternal storage device 304 stores the hot folder program and datanecessary for the operation of the hot folder program.

The network I/F 305 performs communication control for connecting to thenetwork such as an intranet, and various communication interfaces may beused depending on a user environment. The network I/F 305 may be, forexample, a wireless LAN interface or an Ethernet interface.

The input/output device I/F 306 processes an input/output from thekeyboard 203, pointing device 202, or printing apparatus 102 of theinformation processing apparatus 101, and is used in operating theinformation processing apparatus 101 and inputting/outputting data. Thedisplay I/F 307 processes an input/output to/from the display 204. Thedisplay 204 may be implemented by, for example, a CRT, a liquid crystaldisplay, a plasma display, a rear projection television, or a frontprojector, and its control circuit. Communication of various data andpower supply between the blocks of the information processing apparatus101 are implemented via the system bus 308. The system bus 308 includesan address line, data line, control line, and power supply/ground line.

FIG. 4 is a block diagram showing the structure of the hot folderprogram of the information processing apparatus 101. The hot folderprogram includes a hot folder monitoring module 401, a hot folder UI402, and a hot folder control module 403. The hot folder monitoringmodule 401 monitors the hot folder, and detects job data. The hot folderUI 402 controls information about the hot folder displayed on thedisplay. The hot folder control module 403 controls the hot folder.

The hot folder monitoring module 401 includes a flexible type hot foldermonitoring module 404, a fix type hot folder monitoring module 405, anda hot folder monitoring I/F 406. The flexible type hot folder monitoringmodule 404 monitors a folder settings of which can be changed for eachprinting operation. The fix type hot folder monitoring module 405monitors a folder settings of which are not changed for each printingoperation. When a new print request is sent, the hot folder monitoringI/F 406 sends a print request to the hot folder control module 403.

The hot folder UI 402 includes a job management UI 407, a printermanagement UI 408, a hot folder management UI 409, a job ticketmanagement UI 410, an event history management UI 411, a configurationmanagement UI 412, and a hot folder UI I/F 413. The job management UI407 is a UI display module used to manage a print job. The printermanagement UI 408 displays information about the printing apparatus 102managed in the hot folder. The hot folder management UI 409 displaysinformation about the hot folder managed by itself. The job ticketmanagement UI 410 displays setting information and print data called asa job ticket to be sent to the printing apparatus 102. The event historymanagement UI 411 displays the history of pieces of information aboutvarious events such as print completion and the exhaustion of papersheets, which are transmitted from the printing apparatus 102. Theconfiguration management UI 412 is a display module for settinginformation of the hot folder program. The hot folder UI I/F 413 servesas an interface with the hot folder control module 403.

The hot folder control module 403 includes a hot folder control I/F 414,a job management module 415, a printer management module 416, and a hotfolder management module 417. The hot folder control module 403 alsoincludes a job ticket management module 418, an event history managementmodule 419, a configuration management module 420, and a device controlI/F 421. The hot folder control I/F 414 is connected with the hot foldermonitoring I/F 406 and the hot folder UI I/F 413. The job managementmodule 415 manages a print job. The printer management module 416manages a printer managed in the hot folder. The hot folder managementmodule 417 manages hot folder information. The job ticket managementmodule 418 manages a job ticket. The event history management module 419manages the history of pieces of information about various events suchas print completion and the exhaustion of paper sheets, which aretransmitted from the printing apparatus 102. The configurationmanagement module 420 manages setting information of the hot folderprogram. The device control I/F 421 serves as an interface with theprinting apparatus 102.

[Hot Folder]

A method of processing the hot folder in the information processingapparatus 101 according to this embodiment will be described below. As ahot folder, there is a flexible type hot folder and a fix type hotfolder. For a flexible type hot folder, a job is input by copying, asjob data, data (to also be referred to as contents hereinafter) to beprinted and a print setting file (to also be referred to as a job tickethereinafter) in the hot folder. On the other hand, for a fix type hotfolder, a job ticket is associated with the hot folder in advance andthen a job is input by only inputting contents. A fix type hot folderwill be described below unless otherwise specified. The presentinvention, however, is also applicable to a flexible type hot folder.

[Creation of Hot Folder]

To use a hot folder in the information processing apparatus 101, a hotfolder needs to be created. The hot folder management module 417 shownin FIG. 4 creates a hot folder. The module 417 designates a folderexisting in the external storage device 304 by the user operation of thehot folder management UI 409 displayed on the display 204, therebycreating a hot folder in the external storage device 304. Note that ahot folder creation location is not necessarily in the external storagedevice 304 within the information processing apparatus 101 on which ahot folder program operates. For example, a shared folder of another PCor the like connected via the network 110 may be set as a hot folder.

[Association of Job Ticket]

When creating a hot folder as described above, a job ticket isdesignated, thereby allowing to create a hot folder as a fix type hotfolder with which the job ticket is associated. Note that if a jobticket is not designated in creating a hot folder, the hot folder isconsidered as a flexible type hot folder.

[Storage of Hot Folder Information]

When a hot folder is created, the hot folder management module 417manages information designated using the hot folder management UI, andthe external storage device 304 stores the folder path, the job ticket,the target printer, and the like of the hot folder.

[Input of Job]

The user can input job data in a created hot folder. The job dataindicates contents and a job ticket. Some methods of inputting job datacan be used. The user who operates the pointing device 202, for example,drags and drops a file of contents in a hot folder on a GUI displayed onthe display 204. Alternatively, an upper level application may copy afile of contents in a hot folder.

[Method of Monitoring Hot Folder]

The hot folder monitoring module 401 monitors whether job data is inputin a hot folder. FIG. 5 is a flowchart illustrating the procedure of jobmonitoring processing for a hot folder according to this embodiment. Theprocessing shown in FIG. 5 is executed by, for example, the CPU 301 ofthe information processing apparatus 101.

In step S501, the hot folder monitoring module 401 polls a hot folder.If a hot folder program detects an unlocked file in the target hotfolder, it determines that there exists input job data. Alternatively,if there is no file or if a file exists but the file is locked (the fileis in a locked state), the hot folder program determines that there isno input job data.

If it is determined that there exists job data, the job data hasundergone a copy operation or a copy operation has just started and thejob data has not been locked. In either state, the hot folder monitoringmodule 401 stands by for a predetermined period of time in step S502 tocorrectly process the hot folder. After the predetermined period of timeelapses, the hot folder monitoring module 401 acquires the job data instep S503.

[Method of Setting Standby Time]

The predetermined standby time in step S502 may be set according to theenvironment shown in FIG. 1. As shown in FIG. 6, for example, bystoring, in a storage area of the information processing apparatus 101,a setting file 601 in which operation settings of the hot foldermonitoring module 401 are described, and describing a standby time inthe file 601, it may be possible to change the predetermined standbytime. In this case, when executing the processing shown in FIG. 5, thehot folder monitoring module 401 loads the setting file 601, and standsby for the standby time acquired from the file 601.

[Transmission of Job Data]

The hot folder monitoring module 401 passes the job data acquired instep S503 to the hot folder control module 403. The hot folder controlmodule 403 passes the job data to the printing apparatus 102 via thedevice control I/F 421 to instruct printing (print processing).

As described above, according to this embodiment, it is possible toappropriately process job data being copied in a hot folder betweendifferent OSs without misidentifying the job data as that which hasundergone a file copy operation.

Second Embodiment

In the first embodiment, processing of determining whether a file copyoperation of job data is complete includes detecting a file (job data)again when a predetermined period of time elapses after the file isdetected. In this embodiment, in consideration of a case in which adelay in starting a file lock is longer than a predetermined period oftime, completion of a file copy operation of job data is determinedbased on the file size of the job data.

FIG. 7 is a flowchart illustrating the procedure of job monitoringprocessing for a hot folder according to this embodiment. The processingshown in FIG. 7 is executed by, for example, a CPU 301 of an informationprocessing apparatus 101. In step S701, the CPU 301 polls a hot folder.If it is determined that there exists job data, its file size (anexample of the first acquisition operation of acquiring the first size)is stored in step S702. In step S703, the CPU 301 stands by for apredetermined period of time as in step S502. In step S704, the CPU 301acquires the job data again to acquire its file size (an example of thesecond acquisition operation of acquiring the second size). Then, theCPU 301 compares the file size acquired in step S704 with that stored instep S702. In step S705, it is determined as a result of the comparisonwhether the file size acquired in step S704 is larger than that storedin step S702. If it is determined that the file size acquired in stepS704 is larger than that stored in step S702, the CPU 301 determinesthat the job data is being copied, and stores, as a data size, the filesize determined to be larger. The process returns to step S703 to standby for the predetermined period of time. Alternatively, if it isdetermined that the file size acquired in step S704 is not larger thanthat stored in step S702, the CPU 301 determines that the copy operationis complete.

The processes shown in FIGS. 5 and 7 may be switched depending on thesettings of the information processing apparatus 101.

Other Embodiments

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment(s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium)

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2010-288554, filed Dec. 24, 2010, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An information processing apparatus forprocessing a file stored in a hot folder, comprising: a detection unitconfigured to detect the file which has been stored in the hot folder;an acquisition unit configured to, in a case where the detection unitdetects the file which has been stored in the hot folder, acquire a sizeof the file; a determination unit configured to determine whether thesize acquired by said acquisition unit is larger than a reference size,wherein the reference size is referenced for starting processing of thefile stored in the hot folder; a processing unit configured to processthe file detected by said detection unit based on a setting associatedwith the hot folder; and a control unit configured to control theprocessing unit to wait for a predetermined period of time withoutprocessing the file detected by said detection unit based on the settingassociated with the hot folder if the determination unit determines thatthe size acquired by said acquisition unit is larger than the referencesize, wherein the control unit controls the processing unit to processthe file detected by the detection unit based on the setting associatedwith the hot folder if the determination unit determines that the sizeacquired by said acquisition unit is not larger than the reference sizewhen the predetermined period of time elapses.
 2. The apparatusaccording to claim 1, wherein the processing of the file is printprocessing.
 3. The apparatus according to claim 1, wherein the referencesize is a size of the file prior to an elapse of the predeterminedperiod of time for retry of the process by the processing unit.
 4. Theapparatus according to claim 1, wherein the processing of the file isprint processing.
 5. An information processing method which is executedin an information processing apparatus for processing a file stored in ahot folder, comprising: a detection step of detecting the file which hasbeen stored in the hot folder; an acquisition step of, in a case wherethe detection step detects the file which has been stored in the hotfolder, acquiring a size of the file; a determination step ofdetermining whether the size acquired by said acquisition step is largerthan a reference size, wherein the reference size is referenced forstarting processing of the file stored in the hot folder; a processingstep of processing the file detected in the detection step based on asetting associated with the hot folder; and a control step ofcontrolling the processing to wait for a predetermined period of timewithout processing the file or to process the file detected by thedetection step based on the setting associated with the hot folder if itis determined in the determination step that the size acquired by saidacquisition step is larger than the reference size, wherein theprocessing is controlled to process the file detected by the detectionstep based on the setting associated with the hot folder if it isdetermined in the determination step that the size acquired by saidacquisition step is not larger than the reference size when thepredetermined period of time elapses.
 6. The non-transitorycomputer-readable storage medium according to claim 5, wherein theprocessing of the file is print processing.
 7. The method according toclaim 5, wherein the reference size is a size of the file prior to anelapse of the predetermined period of time for retry of the process bythe processing step.
 8. The information processing method according toclaim 5, wherein the processing of the file is print processing.
 9. Anon-transitory computer-readable storage medium storing a program forcausing a computer to execute a detection step of detecting the filewhich has been stored in the hot folder; an acquisition step of, in acase where the detection step detects the file which has been stored inthe hot folder, acquiring a size of the file; a determination step ofdetermining whether the size acquired by said acquisition step is largerthan a reference size, wherein the reference size is referenced forstarting processing of the file stored in the hot folder; a processingstep of processing the file detected in the detection step based on asetting associated with the hot folder; and a control step ofcontrolling the processing to wait for a predetermined period of timewithout processing the file or to process the file detected by thedetection step based on the setting associated with the hot folder if itis determined in the determination step that the size acquired by saidacquisition step is larger than the reference size, wherein theprocessing is controlled to process the file detected by the detectionstep based on the setting associated with the hot folder if it isdetermined in the determination step that the size acquired by saidacquisition step is not larger than the reference size when thepredetermined period of time elapses.
 10. The non-transitorycomputer-readable storage medium according to claim 9, wherein theprocessing of the file is print processing.
 11. The non-transitorycomputer-readable storage medium according to claim 9, wherein thereference size is a size of the file prior to an elapse of thepredetermined period of time for retry of the process by the processingstep.